﻿using maranov.SymlinkManager.FilesystemLinks;
using System.Collections.Generic;
using System.Xml.Serialization;

namespace maranov.SymlinkManager.ListManager
{
    /// <summary>
    /// List of filesystem links.
    /// </summary>
    public interface ILinkList : IEnumerable<ILink>, IXmlSerializable
    {
        /// <summary>
        /// Creates all links that can be created and don't exist already.
        /// <param name="continueOnError">Continues if creation fails.</param>
        /// <returns>List of created links.</returns>
        /// </summary>
        ILinkList CreateAll(bool continueOnError = true);

        /// <summary>
        /// Removes all links that can be removed and haven't been removed already.
        /// </summary>
        /// <param name="force">Forces removal. See Remove(...) in ILink.</param>
        /// <param name="continueOnError">Continues if creation fails.</param>
        /// <returns>List of created links.</returns>
        ILinkList RemoveAll(bool force = false, bool continueOnError = true);
    }
}
